<?php
$clientid = $this->session->userdata('clientid');
$clientname = $this->session->userdata('clientname');
$totalproduit = $this->cart->total();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"> 
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Jjosnell </title>
        <META NAME="Description" CONTENT="">
            <script src="<?php echo base_url() . 'assets/js' ?>/jquery-1.4.3.min.js" type="text/javascript"></script>
            <?php
            echo
            "<script>
$(function(){
	 $('.langue').click(function (){
	 	var val=$(this).attr('id');
	 	$.ajax({
        url: '" . site_url('jaco/changelangue') . "/'+val,
		
        dataType: 'text',
         beforeSend: function(){
         	
         },
         success: function(text){
         	location.reload(true);
			},
		error: function (XMLHttpRequest, textStatus, errorThrown) {
		  alert ('Erreur ' + textStatus + ' ' + errorThrown);
		}
    });
    return false;
 	});

	 $('#addcart').click(function (){
	 	
	 	var id=$('#product_id').val();
	 	var qty=$('#product_qty').val();
	 	var price=$('#product_prix').val();
	 	var name=$('#product_nom').val();
	 	var img=$('#product_img').val();
	 	qty=parseInt(qty);
	 		$.ajax({
        url: '" . site_url('jaco/ajout_panier') . "/'+id+'/'+qty+'/'+price+'/'+name+'/'+img,
		
        dataType: 'text',
         beforeSend: function(){
         	
         },
         success: function(text){
         	$('#qtyproduit').html(text);
         	
			},
		error: function (XMLHttpRequest, textStatus, errorThrown) {
		  alert ('Erreur ' + textStatus + ' ' + errorThrown);
		}
		});
	
    return false;
 	});
});


</script>";
            ?>

            <link href="<?php echo base_url() . 'assets/' ?>styles.css" rel="stylesheet" type="text/css" media="screen" />

            <script type="text/javascript" src="<?php echo base_url().'assets/' ?>fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
            <script type="text/javascript" src="<?php echo base_url().'assets/' ?>fancybox/jquery.fancybox-1.3.4.pack.js"></script>
            <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/' ?>fancybox/jquery.fancybox-1.3.4.css" media="screen" />

            <script type="text/javascript">
		$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a#example1").fancybox();

			$("a#example2").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'
			});

			$("a#example4").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
			});

			$("a#example5").fancybox();

			$("a#example6").fancybox({
				'titlePosition'		: 'outside',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.9
			});

			$("a#example7").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example8").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			/*
			*   Examples - various
			*/

			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});

			$("#various2").fancybox();

			$("#various3").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

			$("#various4").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
	</script>
    </head>
    <body   leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

        <div id="top" align="center">

            <div id="list_langue">
                <a id="fr" class="langue"  href="#"> <img title="Francais" border="0" src="<?php echo base_url() . 'assets/images/' ?>fr.png"/> </a>
                <a href="#"> <img title="Espagnol" border="0" src="<?php echo base_url() . 'assets/images/' ?>es.png"/> </a>
                <a class="langue" id="en" href="<?php echo site_url('jaco/changelangue/en'); ?>"> <img title="Anglais" border="0" src="<?php echo base_url() . 'assets/images/' ?>en.png"/> </a>
                <a href="#"> <img border="0" title="Allemagne" src="<?php echo base_url() . 'assets/images/' ?>al.png"/> </a>
                <a href="#"> <img border="0" title="Hollandais" src="<?php echo base_url() . 'assets/images/' ?>ho.png"/> </a>
            </div>
            <!--END list_langue-->
            <div id="top_wrapper">

                <div id="topleft">
                    <img src="<?php echo base_url() . 'assets/images/' ?>logo.png"/>
                </div>
                <!--END TOPLEFT-->

                <div id="topright">
                    <div align="right" id="searchbar">
                        <table width="100%">
                            <tr>
                                <td align="left">
                                    <?php if (isset($clientid) && $clientid != NULL) {
                                    ?>
                                        <a href="<?php echo site_url('client'); ?>"><?php echo $langue['bonjour'] . ' ' . $clientname; ?></a> | <a href="<?php echo site_url('jaco/deconnexion'); ?>"><?php echo $langue['deconnexion']; ?></a>
                                    <?php } else {
                                    ?>
                                        <a href="<?php echo site_url('jaco/connexion'); ?>" id="connexion"> <?php echo $langue['connexion']; ?> </a> &nbsp;|&nbsp;
                                        <a href="<?php echo site_url('jaco/inscription'); ?>"> <?php echo $langue['inscription']; ?> </a>
                                    <?php } ?>
                                    &nbsp;|&nbsp; <a href="<?php echo site_url('jaco/panier'); ?>"><?php echo $langue['panier']; ?>(<span id="qtyproduit"><?php
                                    if ($totalproduit != NULL)
                                        echo $totalproduit . " &euro; "; else
                                        echo "0 &euro; ";
                                    ?></span>)</a>
                                </td>
                                <td align="right">
                                    <?php echo form_open(base_url() . 'index.php/jaco/recherche') ?>
                                    <?php if ($view_path == "recherche") {
                                    ?>
                                    <?php echo $langue['recherche']; ?> <input id="searchbox" type="text" name="search" value="<?php echo $recherche; ?>"/>
                                    <?php } else {
                                    ?>
                                    <?php echo $langue['recherche']; ?> <input id="searchbox" type="text" name="search" />
                                    <?php } ?>
                                    <?php echo form_close() ?>
                                </td>
                            </tr>
                        </table>

                    </div>
                    <!--END searchbar-->

                    <div align="left" id="menubar">
                        <?php
                                    $affaccueil = "";
                                    $affnotreentreprise = "";
                                    $affnosanimaux = "";
                                    $affdisponible = "";
                                    $affactu = "";
                                    $affpro = "";
                                    $affcontact = "";
                                    if ($view_path == "home")
                                        $affaccueil = "class='active'";
                                    elseif ($view_path == "entreprise")
                                        $affnotreentreprise = "class='active'";
                                    elseif ($view_path == "animaux")
                                        $affnosanimaux = "class='active'";
                                    elseif ($view_path == "dispo")
                                        $affdisponible = "class='active'";
                                    elseif ($view_path == "actu")
                                        $affactu = "class='active'";
                                    elseif ($view_path == "contact")
                                        $affcontact = "class='active'";
                                    elseif ($view_path == "detail_actu")
                                        $affactu = "class='active'";
                        ?>
                                    <ul>
                                        <li><a <?php echo $affaccueil; ?> href="<?php echo site_url('jaco/'); ?>"><?php echo $langue['accueil']; ?></a></li>
                                        <li><a <?php echo $affnotreentreprise; ?> href="<?php echo site_url('jaco/notre_entreprise'); ?>"><?php echo $langue['notre_ent']; ?></a></li>
                                        <li><a <?php echo $affnosanimaux; ?> href="<?php echo site_url('jaco/nos_animaux'); ?>"><?php echo $langue['nos_animaux']; ?></a></li>
                                        <li><a <?php echo $affdisponible; ?> href="<?php echo site_url('jaco/disponible'); ?>"><?php echo $langue['dispo_actuel']; ?></a></li>
                                        <li><a <?php echo $affactu; ?> href="<?php echo site_url('jaco/actualites'); ?>"><?php echo $langue['actu']; ?></a></li>
                                        <li><a <?php echo $affpro; ?> href="<?php echo site_url('espace_pro'); ?>"><?php echo $langue['espace_pro']; ?></a></li>
                                        <li><a <?php echo $affcontact; ?> href="<?php echo site_url('jaco/contact') ?>"><?php echo $langue['contact']; ?></a></li>
                                    </ul>
                                </div>
                                <!--END menubar-->
                                <div id="link_nav" align="left">
                        <?php echo $langue['top_nav']; ?>
                                </div>
                            </div>
                            <!--END TOPRIGHT-->

                        </div>

                        <!--END TOP_WRAPPER-->
            <?php if ($is_banner == true) {
 ?>

                                        <div id="banner" align="left">

                                            <div id="titre_banner"><?php echo $langue['banner_titre']; ?></div>
                                            <div id="detail_banner"><?php echo $langue['banner_des']; ?></div>
                                            <div id="suitebanner"><a  href="<?php echo site_url('jaco/notre_entreprise'); ?>"><?php echo $langue['lire_la_suite']; ?></a></div>
                                        </div>
                                        <!--END BANNER-->
<?php } ?>

        </div>
        <!--END TOP-->
        <div align="center">
            <div id="wrapper">